/*
 * @Author: shijianxin
 * @Date: 2022-04-22 16:10:54
 * @Description: 代理配置
 */

const { createProxyMiddleware } = require("http-proxy-middleware");

module.exports = function (app) {
  app.use(
    createProxyMiddleware("/api", {
      target: "http://localhost:3001",
      changeOrigin: true,
      ws: true,
      pathRewrite: {
        "^/api": "/api",
      },
    })
  );
};
